package ioexception;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * IO体系的标准异常处理方式
 */
public class Demo {
	public static void main(String[] args) {
		FileReader fr = null;
		try {
			//fr = new FileReader("M:/day24/9.txt");
			fr = new FileReader("day24/9.txt");
			int ch = fr.read();
			System.out.println((char) ch);

		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				if(fr!=null) {
					fr.close();
				}
			}catch(IOException e){
				e.printStackTrace();
			}
		}

	}
}
